import React, {Component} from "react";
// StackNavigator用于实现各个页面间的跳转。TabNavigator切换组件，实现同一页面上不同界面的切换。
import {
      createStackNavigator,
      createAppContainer
    } from 'react-navigation';
import {
    AppRegistry,
    StyleSheet,
    Text,
    Button,
    Image,
    View,
    TouchableOpacity
} from 'react-native';

import LoadMoreDemo from './updown'
import HomePage from './HomePage'
import SwFlatListPage from './ce'
import HomeScreen from './group'

const RootStack = createStackNavigator({
    HomePage: {
        screen: HomePage
    },

    updown: {
        screen: LoadMoreDemo,
        navigationOptions: ({navigation}) => ({
            title: "updown",//动态设置navigationOptions
        })
    },
    SwFlatListPage: {
        screen: SwFlatListPage,
        navigationOptions: ({navigation}) => ({
            title: "SwFlatListPage",//动态设置navigationOptions
        })
    },
    SectionListPage: {
        screen: HomeScreen,
        navigationOptions: ({navigation}) => ({
            title: "SectionListPage",//动态设置navigationOptions
        })
    },

}, {
    defaultNavigationOptions: {
        // header: null,// 可以通过将header设为null 来禁用StackNavigator的Navigation Bar
    }
});


const AppRefresh = createAppContainer(RootStack);

export default AppRefresh;
